package com.blb.bookms.entity;

import java.io.Serializable;

public class Book  implements Serializable {

    private Long id;
    private String name;
    private String author;
    private Double price;
    private String picture;
    private String publishDate;
    private String publisher;
    private Long typeId;

    //书籍类型
    private BookType bookType;

    public Book(Long id, String name, String author, double price, String picture, String publishDate, String publisher, Long typeId) {
        this.id = id;
        this.name = name;
        this.author = author;
        this.price = price;
        this.picture = picture;
        this.publishDate = publishDate;
        this.publisher = publisher;
        this.typeId = typeId;
    }

    public Book(Long id, String name, String author, double price, String picture) {
        this.id = id;
        this.name = name;
        this.author = author;
        this.price = price;
        this.picture = picture;
    }

    public Book(String name, String author, double price, String picture) {
        this.name = name;
        this.author = author;
        this.price = price;
        this.picture = picture;
    }

    public Book() {
    }

    public BookType getBookType() {
        return bookType;
    }

    public void setBookType(BookType bookType) {
        this.bookType = bookType;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }

    public String getPublishDate() {
        return publishDate;
    }

    public void setPublishDate(String publishDate) {
        this.publishDate = publishDate;
    }

    public String getPublisher() {
        return publisher;
    }

    public void setPublisher(String publisher) {
        this.publisher = publisher;
    }

    public Long getTypeId() {
        return typeId;
    }

    public void setTypeId(Long typeId) {
        this.typeId = typeId;
    }

    @Override
    public String toString() {
        return "Book{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", author='" + author + '\'' +
                ", price=" + price +
                ", picture='" + picture + '\'' +
                ", publish_date='" + publishDate + '\'' +
                ", publisher='" + publisher + '\'' +
                ", typeId=" + typeId +
                '}';
    }
}
